1. Field of the Invention
The present invention generally relates to control units, image processing apparatuses and computer-readable storage media, and more particularly to a control unit, an image processing apparatus and a computer-readable storage medium which stores a program for storing memory information in a portable storage device. The present invention also relates to a memory information storage control method for controlling storage of the memory information in the portable storage device.
2. Description of the Related Art
Conventionally, in a control unit which executes an application program on a general-purpose Operating System (OS) such as UNIX (registered trademark), there is a function of forcibly ending the application program from the OS when the operation of the application program cannot be continued in a normal manner. For example, in the general-purpose OS typified by UNIX, if the operation of the application program cannot be continued in the normal manner, a signal is sent to the application program to end the processes of the application program, and a core dump process is executed depending on the type of the signal sent from the OS to the application program.
Recently, in image processing apparatuses, such as printing apparatuses, facsimile apparatuses, copying apparatuses and Multi-Function Peripheral (MFPs), which are embedded in advance with predetermined functions, an OS based on the general-purpose UNIX OS is employed because of the demand to provide numerous functions in order to improve the performance of the image processing apparatuses. Hence, in such image processing apparatuses, a core dump process is executed if an abnormality is generated.
Conventionally, the OS executes the core dump process in a manner shown in FIG. 1. FIG. 1 is a flow chart for explaining an example of a conventional memory information storage process. If an abnormality which requires execution of the core dump process is generated, the OS calls a core dump executing part, and the core dump executing part creates a name of a core file in a step S1001 shown in FIG. 13. The core file name is created using the name, process ID or the like of an application program which generated the abnormality. Next, the core dump executing part decides whether the file with the core file name can be created in a work directory of the application program which is the core dump target, in a step S1002. The core dump process ends if the file with the core file name cannot be created in the work directory and the decision result in the step S1002 is NO.
If the file with the core file name can be created in the work directory and the decision result in the step S1002 is YES, the core dump executing part creates the file with the core file name in a step S1003. In addition, the core dump executing part writes memory information used by the application program in the file with a size of the memory block managed by the OS, in a step S1004.
When the memory information is written to the file, the core dump executing part decides whether the memory information is written in a normal manner, in a step S1005. The core dump process ends if the memory information is not written in the normal manner and the decision result in the step S1005 is NO.
If the memory information is written in the normal manner and the decision result in the step S1005 is YES, the core dump executing part decides whether the memory information that is written is the last block within the memory which is being used by the application program, in a step S1006. If the memory information that is written is not the last block within the memory which is being used by the application program and the decision result in the step S1006 is NO, the process returns to the step S1004, and the steps S1004 through S1006 are carried out similarly as described above.
On the other hand, the core dump executing part ends the core dump process if the memory information that is written is the last block within the memory which is being used by the application program and the decision result in the step S1006 is YES.
The core dump process described above writes the memory information to a storage unit having a large storage capacity, such as a hard disk drive. However, compact and inexpensive apparatuses, such as embedded apparatuses, are in most cases not provided with the storage unit having the large storage capacity, such as the hard disk drive, in order to reduce the cost of the apparatus. In such apparatuses not provided with the storage unit having the large storage capacity, it is difficult to utilize the core dump function.
A Japanese Laid-Open Patent Application No. 2007-172414 proposes a technique for generating a core file suited to a preset storage size, prior to executing the core dump process.
In addition, a Japanese Laid-Open Patent Application No. 8-328912 proposes a technique for outputting a core file via a network to a remote hard disk drive.
However, according to the techniques proposed in the Japanese Laid-Open Patent Applications No. 2007-172414 and No. 8-328912, it is difficult to positively execute the core dump process at a low cost.
First, according to the technique proposed in the Japanese Laid-Open Patent Application No. 2007-172414, the core file is generated by limiting the storage size. For this reason, the core file that can be stored is limited, and if it becomes necessary to interpret the information that is not stored as the core file, the information must be acquired again, thereby making both the processing efficiency and utilization efficiency of the technique poor.
Second, according to the technique proposed in the Japanese Laid-Open Patent Application No. 8-328912, the core file is output to the remote storage unit via the network. For this reason, the core file cannot be stored if an apparatus for transmitting the core file is not connected to the network or, the apparatus for transmitting the core file is connected to the network but the remote storage unit for storing the core file cannot be provided.